package com.vegetable.modules.entity.inbound;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.vegetable.common.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 其他入库商品表
 * </p>
 *
 * @author wangruijie
 * @since 2024-03-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="OtherDeliveryDetail对象", description="其他入库商品表")
public class OtherDeliveryDetail extends BaseEntity {

    @ApiModelProperty(value = "生产者ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long producerId;

    @ApiModelProperty(value = "主表id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long deliveryId;

    @ApiModelProperty(value = "库存进出ID")
    private String stockInOutId;

    @ApiModelProperty(value = "商品ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long commodityId;

    @ApiModelProperty(value = "商品编码")
    @TableField(exist = false)
    private String commodityCode;

    @ApiModelProperty(value = "商品名称")
    private String commodityName;

    @ApiModelProperty(value = "规格ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long specsId;

    @ApiModelProperty(value = "规格ID")
    private String specsName;

    @ApiModelProperty(value = "标准")
    private BigDecimal standard;

    @ApiModelProperty(value = "数量")
    private Integer number;

    @ApiModelProperty(value = "重量")
    private BigDecimal weight;

    @ApiModelProperty(value = "金额")
    private BigDecimal money;

    @ApiModelProperty(value = "单价")
    private BigDecimal unitPrice;

    @ApiModelProperty(value = "商品金额")
    private BigDecimal goodsMoney = BigDecimal.ZERO;

    @ApiModelProperty(value = "包装金额")
    private BigDecimal packageMoney = BigDecimal.ZERO;

    @ApiModelProperty(value = "成本")
    private BigDecimal cost;

    @ApiModelProperty(value = "商品其他费用")
    @TableField(exist = false)
    private List<OrderCost> costs;

    @ApiModelProperty(value = "商品包装费用")
    @TableField(exist = false)
    private List<AgentDeliveryDetailPack> autoCosts;

}
